
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Wgl
	{
		/// <summary>
		/// [WGL] Value of WGL_GPU_VENDOR_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_VENDOR_AMD = 0x1F00;

		/// <summary>
		/// [WGL] Value of WGL_GPU_RENDERER_STRING_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_RENDERER_STRING_AMD = 0x1F01;

		/// <summary>
		/// [WGL] Value of WGL_GPU_OPENGL_VERSION_STRING_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_OPENGL_VERSION_STRING_AMD = 0x1F02;

		/// <summary>
		/// [WGL] Value of WGL_GPU_FASTEST_TARGET_GPUS_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_FASTEST_TARGET_GPUS_AMD = 0x21A2;

		/// <summary>
		/// [WGL] Value of WGL_GPU_RAM_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_RAM_AMD = 0x21A3;

		/// <summary>
		/// [WGL] Value of WGL_GPU_CLOCK_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_CLOCK_AMD = 0x21A4;

		/// <summary>
		/// [WGL] Value of WGL_GPU_NUM_PIPES_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_NUM_PIPES_AMD = 0x21A5;

		/// <summary>
		/// [WGL] Value of WGL_GPU_NUM_SIMD_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_NUM_SIMD_AMD = 0x21A6;

		/// <summary>
		/// [WGL] Value of WGL_GPU_NUM_RB_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_NUM_RB_AMD = 0x21A7;

		/// <summary>
		/// [WGL] Value of WGL_GPU_NUM_SPI_AMD symbol.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public const int GPU_NUM_SPI_AMD = 0x21A8;

		/// <summary>
		/// [WGL] wglGetGPUIDsAMD: Binding for wglGetGPUIDsAMD.
		/// </summary>
		/// <param name="maxCount">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="ids">
		/// A <see cref="T:uint[]"/>.
		/// </param>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public static uint GetGPUIDsAMD(uint maxCount, [Out] uint[] ids)
		{
			uint retValue;

			unsafe {
				fixed (uint* p_ids = ids)
				{
					Debug.Assert(Delegates.pwglGetGPUIDsAMD != null, "pwglGetGPUIDsAMD not implemented");
					retValue = Delegates.pwglGetGPUIDsAMD(maxCount, p_ids);
					LogCommand("wglGetGPUIDsAMD", retValue, maxCount, ids					);
				}
			}
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglGetGPUInfoAMD: Binding for wglGetGPUInfoAMD.
		/// </summary>
		/// <param name="id">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="property">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="dataType">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="size">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="data">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public static int GetGPUInfoAMD(uint id, int property, int dataType, uint size, IntPtr data)
		{
			int retValue;

			Debug.Assert(Delegates.pwglGetGPUInfoAMD != null, "pwglGetGPUInfoAMD not implemented");
			retValue = Delegates.pwglGetGPUInfoAMD(id, property, dataType, size, data);
			LogCommand("wglGetGPUInfoAMD", retValue, id, property, dataType, size, data			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglGetContextGPUIDAMD: Binding for wglGetContextGPUIDAMD.
		/// </summary>
		/// <param name="hglrc">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public static uint GetContextGPUIDAMD(IntPtr hglrc)
		{
			uint retValue;

			Debug.Assert(Delegates.pwglGetContextGPUIDAMD != null, "pwglGetContextGPUIDAMD not implemented");
			retValue = Delegates.pwglGetContextGPUIDAMD(hglrc);
			LogCommand("wglGetContextGPUIDAMD", retValue, hglrc			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglCreateAssociatedContextAMD: Binding for wglCreateAssociatedContextAMD.
		/// </summary>
		/// <param name="id">
		/// A <see cref="T:uint"/>.
		/// </param>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public static IntPtr CreateAssociatedContextAMD(uint id)
		{
			IntPtr retValue;

			Debug.Assert(Delegates.pwglCreateAssociatedContextAMD != null, "pwglCreateAssociatedContextAMD not implemented");
			retValue = Delegates.pwglCreateAssociatedContextAMD(id);
			LogCommand("wglCreateAssociatedContextAMD", retValue, id			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglCreateAssociatedContextAttribsAMD: Binding for wglCreateAssociatedContextAttribsAMD.
		/// </summary>
		/// <param name="id">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="hShareContext">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		/// <param name="attribList">
		/// A <see cref="T:int[]"/>.
		/// </param>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public static IntPtr CreateAssociatedContextAttribsAMD(uint id, IntPtr hShareContext, int[] attribList)
		{
			IntPtr retValue;

			unsafe {
				fixed (int* p_attribList = attribList)
				{
					Debug.Assert(Delegates.pwglCreateAssociatedContextAttribsAMD != null, "pwglCreateAssociatedContextAttribsAMD not implemented");
					retValue = Delegates.pwglCreateAssociatedContextAttribsAMD(id, hShareContext, p_attribList);
					LogCommand("wglCreateAssociatedContextAttribsAMD", retValue, id, hShareContext, attribList					);
				}
			}
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglDeleteAssociatedContextAMD: Binding for wglDeleteAssociatedContextAMD.
		/// </summary>
		/// <param name="hglrc">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public static bool DeleteAssociatedContextAMD(IntPtr hglrc)
		{
			bool retValue;

			Debug.Assert(Delegates.pwglDeleteAssociatedContextAMD != null, "pwglDeleteAssociatedContextAMD not implemented");
			retValue = Delegates.pwglDeleteAssociatedContextAMD(hglrc);
			LogCommand("wglDeleteAssociatedContextAMD", retValue, hglrc			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglMakeAssociatedContextCurrentAMD: Binding for wglMakeAssociatedContextCurrentAMD.
		/// </summary>
		/// <param name="hglrc">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public static bool MakeAssociatedContextCurrentAMD(IntPtr hglrc)
		{
			bool retValue;

			Debug.Assert(Delegates.pwglMakeAssociatedContextCurrentAMD != null, "pwglMakeAssociatedContextCurrentAMD not implemented");
			retValue = Delegates.pwglMakeAssociatedContextCurrentAMD(hglrc);
			LogCommand("wglMakeAssociatedContextCurrentAMD", retValue, hglrc			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglGetCurrentAssociatedContextAMD: Binding for wglGetCurrentAssociatedContextAMD.
		/// </summary>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public static IntPtr GetCurrentAssociatedContextAMD()
		{
			IntPtr retValue;

			Debug.Assert(Delegates.pwglGetCurrentAssociatedContextAMD != null, "pwglGetCurrentAssociatedContextAMD not implemented");
			retValue = Delegates.pwglGetCurrentAssociatedContextAMD();
			LogCommand("wglGetCurrentAssociatedContextAMD", retValue			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglBlitContextFramebufferAMD: Binding for wglBlitContextFramebufferAMD.
		/// </summary>
		/// <param name="dstCtx">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		/// <param name="srcX0">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="srcY0">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="srcX1">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="srcY1">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="dstX0">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="dstY0">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="dstX1">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="dstY1">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="mask">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="filter">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("WGL_AMD_gpu_association")]
		public static void BlitContextFramebufferAMD(IntPtr dstCtx, int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, uint mask, int filter)
		{
			Debug.Assert(Delegates.pwglBlitContextFramebufferAMD != null, "pwglBlitContextFramebufferAMD not implemented");
			Delegates.pwglBlitContextFramebufferAMD(dstCtx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
			LogCommand("wglBlitContextFramebufferAMD", null, dstCtx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter			);
			DebugCheckErrors(null);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("WGL_AMD_gpu_association")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate uint wglGetGPUIDsAMD(uint maxCount, uint* ids);

			[RequiredByFeature("WGL_AMD_gpu_association")]
			internal static wglGetGPUIDsAMD pwglGetGPUIDsAMD;

			[RequiredByFeature("WGL_AMD_gpu_association")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate int wglGetGPUInfoAMD(uint id, int property, int dataType, uint size, IntPtr data);

			[RequiredByFeature("WGL_AMD_gpu_association")]
			internal static wglGetGPUInfoAMD pwglGetGPUInfoAMD;

			[RequiredByFeature("WGL_AMD_gpu_association")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate uint wglGetContextGPUIDAMD(IntPtr hglrc);

			[RequiredByFeature("WGL_AMD_gpu_association")]
			internal static wglGetContextGPUIDAMD pwglGetContextGPUIDAMD;

			[RequiredByFeature("WGL_AMD_gpu_association")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate IntPtr wglCreateAssociatedContextAMD(uint id);

			[RequiredByFeature("WGL_AMD_gpu_association")]
			internal static wglCreateAssociatedContextAMD pwglCreateAssociatedContextAMD;

			[RequiredByFeature("WGL_AMD_gpu_association")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate IntPtr wglCreateAssociatedContextAttribsAMD(uint id, IntPtr hShareContext, int* attribList);

			[RequiredByFeature("WGL_AMD_gpu_association")]
			internal static wglCreateAssociatedContextAttribsAMD pwglCreateAssociatedContextAttribsAMD;

			[RequiredByFeature("WGL_AMD_gpu_association")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate bool wglDeleteAssociatedContextAMD(IntPtr hglrc);

			[RequiredByFeature("WGL_AMD_gpu_association")]
			internal static wglDeleteAssociatedContextAMD pwglDeleteAssociatedContextAMD;

			[RequiredByFeature("WGL_AMD_gpu_association")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate bool wglMakeAssociatedContextCurrentAMD(IntPtr hglrc);

			[RequiredByFeature("WGL_AMD_gpu_association")]
			internal static wglMakeAssociatedContextCurrentAMD pwglMakeAssociatedContextCurrentAMD;

			[RequiredByFeature("WGL_AMD_gpu_association")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate IntPtr wglGetCurrentAssociatedContextAMD();

			[RequiredByFeature("WGL_AMD_gpu_association")]
			internal static wglGetCurrentAssociatedContextAMD pwglGetCurrentAssociatedContextAMD;

			[RequiredByFeature("WGL_AMD_gpu_association")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void wglBlitContextFramebufferAMD(IntPtr dstCtx, int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, uint mask, int filter);

			[RequiredByFeature("WGL_AMD_gpu_association")]
			internal static wglBlitContextFramebufferAMD pwglBlitContextFramebufferAMD;

		}
	}

}
